<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My Exams Results</title>
</head>
<body>
<div id="header"><%@ include file="Header.jsp"%></div>
<div id="content">
	<div id="navbar"><%@ include file="NavigationBar.jsp"%></div>
	<div id="main"><c:set var="user" value="${sessionScope.user}" />
	
		<c:set var="categories" value="${requestScope.categories}"></c:set>
		<c:set var="category" value="${requestScope.category}"></c:set>
		
		
			<div class="box">
				<div class="box-header well">
					<h2><i class=" icon-list-alt"></i> My Exam Results</h2>
				</div>
				<div class="box-content">
					<table class="table table-striped table-bordered bootstrap-datatable datatable" >
						<thead>
							<tr>
								<th>Exam Name</th>
								<th>Exam Category</th>
								<th>Date Taken</th>
								<th>Score</th>
								<th>Action</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="examResponse" items="${user.getExamResponses()}">
								<c:if test="${examResponse.complete eq true }">
									<tr>
										<td>${examResponse.getExam().examName}</td>
										<td>${examResponse.getExam().category}</td>
										<td>${examResponse.dateTaken}</td>
										<td>${examResponse.computeScore()}</td>
										<td><a class="btn btn-info" href="StudentResponseServlet?exam_response_id=${examResponse.examResponseId}"><i class=" icon-search"></i> View Response</a></td>
									</tr>
								</c:if>
							</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
		
	</div>
</div>
</body>
</html>